Resilient programming frameworks for handling failures in parallel programs

ABSTRACT

An information processing system, computer readable storage medium, and method for supporting resilient execution of computer programs. A method provides a resilient store wherein information in the resilient store can be accessed in the event of a failure. The method periodically checkpoints application state in the resilient store. A resilient executor comprises software which executes applications by catching failures. The method uses the resilient executor to execute at least one application. In response to the resilient executor detecting a failure, restoring application state information to the at least one application from a checkpoint stored in the resilient store, the resilient executor resuming execution of the at least one application with the restored application state information.

BACKGROUND

The present disclosure generally relates to fault-tolerant computing,and more particularly relates to a method and system for resilientcomputer programming frameworks for handling failures in executingparallel computer programs.

Failures in executing computer programs constitute a significantproblem. The problem is compounded in multiprocessor environments wherefailure of a single processor can cause a computation to fail, requiringit to be run from scratch.

In recent years, frameworks such as map reduce (Hadoop is a well-knownimplementation, http://hadoop.apache.org/), Spark(https://spark.apache.org/) and Pregel (“Pregel: A System forLarge-Scale Graph Processing”, Malewicz et al, Proceedings of SIGMOD2010, http://kowshik.github.io/JPregel/pregel_paper.pdf) have beenintroduced which provide some degree of resilience to failures. A maindrawback to these previous approaches has been that they were onlyapplicable for applications which follow certain regular patterns. Thereare many applications which do not fit within the paradigms ofmap-reduce or Pregel.

MPI (http://www.mcs.anl.gov/research/projects/mpi/) has been often usedto program parallel computing systems. However, while MPI has providedmessage-passing support, it has not provided a full-fledged programmingenvironment. Instead, it was designed to be used in conjunction withexisting programming languages such as C, C++, Fortran, Java, etc.

There is thus a need for more general frameworks which help programmerswrite resilient programs.

BRIEF SUMMARY

According to one embodiment of the present disclosure, a method forsupporting resilient execution of computer programs comprising the stepsof: providing a resilient store wherein information in the resilientstore can be accessed in the event of a failure; periodicallycheckpointing application state in the resilient store; providing aresilient executor which comprises software which executes applicationsby catching failures; using the resilient executor to execute at leastone application; and in response to the resilient executor detecting afailure, restoring application state information from a checkpoint inthe resilient store, the resilient executor resuming execution of the atleast one application.

According to another embodiment of the present disclosure, aninformation processing system capable of supporting resilient executionof computer programs, the information processing system comprising:memory; persistent memory for storing data and computer instructions; aresilient store, communicatively coupled with the memory and thepersistent memory, wherein information stored in the resilient store canbe accessed in the event of a failure of an application executing in theinformation processing system; a resilient executor, communicativelycoupled with the memory and the persistent memory, for executingcomputations of applications by catching failures in the execution ofthe computations; a processor, communicatively coupled with theresilient executor, resilient store, the memory, the persistent memory,and wherein the processor, responsive to executing computerinstructions, performs operations comprising: periodically checkpointingapplication state in the resilient store; executing, with the resilientexecutor, computations of an application while catching failures in theexecution of the computations; restoring, based on the resilientexecutor detecting a failure in the execution of a computation of theapplication, application state information for the application from acheckpoint in the resilient store; and resuming, with the resilientexecutor, execution of the computation of the application with therestored application state information.

According yet to another embodiment of the present disclosure, acomputer readable storage medium comprises computer instructions which,responsive to being executed by a processor, cause the processor toperform operations for supporting resilient execution of computerprograms, the operations comprising: providing a resilient store whereininformation in the resilient store can be accessed in the event of afailure; periodically checkpointing application state in the resilientstore; providing a resilient executor which comprises software whichexecutes applications by catching failures; using the resilient executorto execute at least one application; and in response to the resilientexecutor detecting a failure, restoring application state information tothe at least one application from a checkpoint stored in the resilientstore, the resilient executor resuming execution of the at least oneapplication with the restored application state information.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The accompanying figures, in which like reference numerals refer toidentical or functionally similar elements throughout the separateviews, and which together with the detailed description below areincorporated in and form part of the specification, serve to furtherillustrate various embodiments and to explain various principles andadvantages all in accordance with the present disclosure, in which:

FIG. 1 is a block diagram illustrating an example of an informationprocessing system in which a computer programming framework isimplemented, according to the present disclosure;

FIG. 2 is a program listing illustrating an example of aResilientComputation interface, according to various examples of thepresent disclosure;

FIG. 3 is a program listing illustrating an example of aResilientIterativeComputation, according to various examples of thepresent disclosure;

FIGS. 4 and 5 constitute a program listing illustrating an example of aResilientExecutor class that can be communicatively coupled with anapplication, according to various examples of the present disclosure.

DETAILED DESCRIPTION

According to various embodiments of the present disclosure, disclosed isa system and method providing a new computer programming framework forprogrammers to write resilient programs. Low level details such ascatching and handling failures are handled by special software. Thisrelieves significant programming burdens from software programmers andparticularly from programmers of modern parallel computing applications.

Various embodiments of the disclosure are applicable to computerprogramming frameworks for software applications comprising a statemachine with a state which can be periodically saved as a storedcheckpoint. In the event of a failure, an application can be restartedfrom application state information restored from a previous storedcheckpoint. If an application can be properly restored without referringto any saved state (e.g., the application already stores all of thestate information needed for recovery in persistent storage, such as ondisk), it is even easier to use an embodiment of the present disclosurefor handling program resilience.

According to various embodiments, a programming framework providessoftware allowing an application to achieve resilience. It greatlysimplifies the task of writing resilient programs.

Various embodiments of the present disclosure provide to applicationprograms one or more of the following features:

1) an ability to execute an application program using exception handlingwhich detects failed places. The term “place” refers to at least a partof an executing computation that may be for an application, such as aprocess (or in some cases, one or more threads). A place may comprise anentity executing a computation.

2) an ability to reliably checkpoint data structures in an applicationso that the data structures will be preserved in the event of a failure.

3) virtual places which hide the actual physical places on which acomputation is executing. Programs reference virtual places instead ofphysical places. That way, if a physical place fails, the computationcan continue to reference virtual places which do not fail. Virtualplaces are mapped to physical places. Mappings of virtual to physicalplaces can be updated to mask physical place failures.

Various non-limiting example embodiments of the present disclosure aredescribed herein using, for illustration purposes only, the X10programming language “X10 Language Specification Version 2.5”, Saraswatet. al,http://x10.sourceforge.net/documentation/languagespec/x10-latest.pdf.Additional information about X10 is available from: http://x10-lang.org/

An embodiment of the present disclosure could also be implemented forother programming languages and programming environments as well.

The ResilientComputation/ResilientExecutor framework, as will bediscussed below, allows X10 programs to be written so that theprogrammer does not have to worry about low level failure handling. Lowlevel details for handling failures such as catching and handling deadplace exceptions (which is a type of exception that is generated by theX10 run-time system when a place fails) are handled by aResilientExecutor class (and classes that it makes use of such asVirtualPlaceMap and ResilientMap).

It is applicable, according various embodiments, for applications withstate which can be periodically checkpointed. In the event of a failure,the application is restarted from the point of the last consistentcheckpoint. If an application can be properly restored without anycheckpointed state (e.g., the application already stores all of thestate needed for recovery in persistent storage, such as on disk), it iseven easier to use the framework for handling resilience.

The present example framework makes use of the following classes:

ResilientExecutor: The main class implementing the framework. See FIGS.4 and 5 for an example.

ResilientComputation: An interface which specifies theapplication-specific methods that an application can use to implementthe framework. See FIG. 2 for an example.

ResilientIterativeComputation: An interface which specifies theapplication-specific methods that an iterative application can use toimplement the framework. See FIG. 3 for an example.

VirtualPlaceMap: A class implementing virtual places which hides theactual physical places used by the application so that the applicationdoes not have to deal directly with place failures. An example of theVirtualPlaceMap will be discussed below with reference to FIG. 3.

ResilientMap: provides resilient storage which is accessible in theevent of place failures.

PlaceGroupUnordered: This class implements place groups in which theorder in the place group may differ from the physical order of places.This is used for managing virtual places.

According to the present example, to use this framework an applicationcan implement the ResilientComputation interface (generally applicable)or the ResilientIterativeComputation interface (for iterativecomputations). There are a wide variety of other interfaces within thespirit and scope of the present disclosure. The ResilientComputationinterface, including its several methods, is shown in FIG. 2 accordingto the present example. The ResilientIterativeComputation interface,including its several methods, is shown in FIG. 3 according to thepresent example. The ResilientExecutor class, and its several methods,is shown in FIGS. 4 and 5 according to the present example.

The framework of the present disclosure, according to the presentexample, can be used with an information processing system as will bedescribed in more detail below.

An application program is implemented as an instance (comp) of a classwhich implements the ResilientComputation interface. If theResilientIterativeComputation interface or other interface is usedinstead, the process would be similar.

comp creates a new ResilientExecutor object, resExec, for theapplication program.

resExec.runResiliently( ) is called to invoke the run method in compresiliently.

The run method in comp periodically invokes resExec.checkpoint tocheckpoint the state of the computation.

If resExec.runResiliently encounters (e.g., detects and catches)exceptions (particularly, dead place exceptions), it resilientlyrestores the state of the computation to the previous checkpoint byinvoking comp.restore. After the state of the computation is restored tothe previous checkpoint, resExec.runResiliently continues thecomputation by invoking the run method in comp resiliently.

A main enabler for the above described approach using the framework isthe use of virtual places. Virtual place numbers remain constantthroughout a computation so that application-specific code does not needto be modified as the result of place failures. The ResilientExecutorclass maintains the virtual place map and replaces dead physical placeswith live physical places to keep virtual place numbers consistentthroughout a computation. Applications are written to iterate overvirtual places instead of physical places.

The ResilientExecutor class is responsible for running applicationprograms under an environment where place failures are automaticallydetected and caught via exception handling, and dead place exceptions inparticular are properly dealt with. This class maintains a virtual placemap to hide the fact that place failures may have occurred whichnecessitate the replacement of one or more physical places with otherphysical places. This class also provides a resilient environment forrecovering from failures. Below is a summary of four features of theresilient framework:

1) Providing code to detect and recover from failures. User applicationcode does not have to worry about low level failure detection eitherduring normal processing or recovery. Exception handling is structuredto provide resiliency for normal execution, checkpointing, and recoveryfrom failures.

2) Providing support to efficiently checkpoint applications. TheResilientMap class is a main feature providing this support.

3) Applications refer to virtual places instead of actual physicalplaces.

4) An object-oriented framework which provides a well-defined interface.The ResilientExecutor can be customized to handle different types offailures and different failure-handling requirements.

Two features of the resilient framework are: 1) it handlesfailure/recovery details so that the programmer does not have to dealwith these details, and 2) it supports efficient checkpointing ofapplication computations. This resilient framework is very general andsupports efficient handling of a much broader range of applications thanframeworks such as Hadoop, Spark, and Pregel.

Virtual Places

Virtual places can be used to mask place failures from programs.Programs refer to virtual places instead of the physical places on whicha computation executes. Virtual places can remain constant during theexecution of a program. The underlying physical places may change. Forexample, if a virtual place v1 is mapped to physical place p1 and p1fails, then v1 can be mapped to another physical place p2. The programcan continue to refer to virtual place v1 both before the failure of p1and after the failure of p1. That way, the application programmer doesnot have to write special code to deal with the fact that places in aprogram may change due to failures.

There are multiple ways that the system can obtain another place p2 toreplace failed place p1. One option is to have a number of spare placesrunning at the start of a computation. Whenever a place fails, thefailed place is replaced by a spare place. This method incurs overheadfor spare places. In addition, problems occur if the system runs out ofspare places.

Another method is to start up a new place at the time of a place failureto replace the failed place. This avoids the drawbacks of failed places.There could be some overhead/delay in starting up a new place, though.

Virtual places are implemented by the class VirtualPlaceMap whichincludes the following methods which an application program can invoketo use:

/* Construct virtual place map identical to physical place map for first  * numPlaces places. Throw an exception if numPlaces is out of range  */  public def this(numPlaces: Long) {  /* Return the virtual place idcorresponding to ″place″. Return   * NONEXISTENT_PLACE if no virtualplace is found   corresponding to ″place″   */  public defphysicalToVirtual(place: Place): Long {  /**   * Return a key that isspecific to the virtual place corresponding to   * the current place. Ifthe current place is not part of the virtual place   * map, returnNONEXISTENT_PLACE_STRING. Useful for   * generating keys for storingplace local data in resilient stores.   */  public defplaceSpecificKey(keyRoot: String): String {  /* Print out the contentsof a virtual place map   */  public def printVirtualPlaceMap( ): void { /* Replace virtual place with id ″id″ with physical place ″Place″.Throw   * an exception if ″id″ is out of range   */  public defreplaceVirtualPlace(id: Long, place: Place): void {  /* Return totalnumber of virtual places in the map   */  public def totalVirtualPlaces(): Long {  /* Return physical place with id ″id″. Throw exception if idis out of   * range   */  public def virtualToPhysical(id: Long): Place{

Resilient Executor Implementation

The ResilientExecutor class, according to various embodiments, runsprograms resiliently using the following methods. The resilient executorcomprises software which executes applications by catching failures. Theresilient executor can also handle at least one exception by recursivelycatching and handling additional exceptions which occur. Below will bediscussed how the ResilientExecutor class can be implemented using theX10 programming language. It is also possible to implement our inventionusing other programming languages. Note in the methods below that“computation” and “iterativeComputation” are objects representing theapplication. According to various embodiments, a frameworkimplementation could have more objects to represent additional types ofapplications within the spirit and scope of the present disclosure.

 // Run computation resiliently, handling failures  public defrunResiliently( ): void {   try {    finish computation.run( ); //application-specific method   } catch (e:MultipleExceptions) {    Console.OUT.println(″ResilientExecutor runResiliently has caughtexceptions″);    handleExceptionsResiliently(e, 0n);    restoreResiliently(NUM_RECOVERY_ATTEMPTS);   }  }  // Run iterativecomputation resiliently, handling failures  public defiterateResiliently( ): void {    var keepIterating: Boolean = true;  try {     finish {      Console.OUT.println(″ResilientExecutor aboutto invoke iterative computation″);      while (keepIterating) {      iterativeComputation.step( ); // application-specific method      iterativeComputation.checkpoint( ); // application-specific method      keepIterating = iterativeComputation.notFinished( ); //application-specific method      }     }   } catch(e:MultipleExceptions) {     Console.OUT.println(″ResilientExecutoriterateResiliently has caught exceptions″);   handleExceptionsResiliently(e, 0n);    restoreResiliently(NUM_RECOVERY_ATTEMPTS);   }  }

If additional types of computations are used, it is possible to haveadditional run methods within the spirit and scope of the invention.

If the run methods encounter failures, they attempt (e.g., invoking arecovery method) to resiliently restore the state of the computationvia:

 // Restore computation resiliently, handling failures  public defrestoreResiliently(attemptsLeft:Int): void {   if (attemptsLeft < 1n)    throw new Exception(″Error in ResilientExecutor.X10restoreResiliently: Recovery from failure failed too many times″);  else {    try {     finish restore( );    } catch(e:MultipleExceptions) {     handleExceptionsResiliently(e, 0n);     restoreResiliently(attemptsLeft - 1n);    }     resumeExecution( );  }  }

The restoreResiliently method invokes application-specific methods torestore the state of the computation of the application. It mightrestore application state information from a checkpoint stored inresilient storage. Below is the code for restore. Note that“computation” and “iterativeComputation” are objects representing theapplication. A particular embodiment could have more objects torepresent additional types of applications within the spirit and scopeof the present disclosure.

 private def restore( ) {   switch (computationType) {    case GENERAL:computation.restore( ); // application-specific method      break;   case ITERATIVE: iterativeComputation.restore( ); // application-specific method      break;    default:     throw new Exception(″Errorin ResilientExecutor.X10: unknown value of computationType in restore(): ″ + computationType);   }  }

It is critically important to catch and handle exceptions properly. Thisis achieved by the following method which is targeted to identifyingdead place exceptions. A dead place exception is an exception whichoccurs when a place fails. It would be possible to extend this methodwithin the spirit and scope of the invention to handle other types ofexceptions as well.

 // resilient method for handling exceptions  private defhandleExceptionsResiliently(e:MultipleExceptions,numExceptionsHandledSoFar:Int):void {   val exceptions = e.exceptions;// e is a Rail of CheckedThrowable   val numExceptions =exceptions.size;   var numExceptionsHandled: Int =numExceptionsHandledSoFar;   try {    finish     while(numExceptionsHandled < numExceptions) {       if(exceptions(numExceptionsHandled) instanceof MultipleExceptions)        handleExceptionsResiliently(exceptions(numExceptionsHandled) asMultipleExceptions, 0n);      else if(!(exceptions(numExceptionsHandled) instanceof DeadPlaceException)) {      Console.OUT.println(″Error: Exception encountered. Here is thestack trace: ″);         e.printStackTrace( );         System.killHere();      }      else {        val deadPlace =(exceptions(numExceptionsHandled) as DeadPlaceException).place;        handleDeadPlace(deadPlace);      }      numExceptionsHandled++;    } // while   }   catch (e2: MultipleExceptions) {   handleExceptionsResiliently(e2, 0n);   handleExceptionsResiliently(e, numExceptionsHandled);   }  }

When dead places are detected by catching and identifying a dead placeexception, they are handled by the following method. A key point is thatthe application program is referring to places using virtual placeswhich never die. Virtual places are mapped to physical places. After aphysical place dies, a live physical place is mapped to the virtualplace previously corresponding to the dead physical place.

 public def handleDeadPlace(deadPlace: Place): void {   if(deadPlace.id( ) >= 0 && deadPlace.id( ) < isDeadPlace.size &&!isDeadPlace(deadPlace.id( ))) {    isDeadPlace(deadPlace.id( )) = true;   val virtualId = virtualPlaces.physicalToVirtual(deadPlace);    if(virtualId != VirtualPlaceMap.NONEXISTENT_PLACE) {    virtualPlaces.replaceVirtualPlace(virtualId, getNewPlace( ));    }  }  }

The restoreResiliently method shown previously calls resumeExecution( )to continue execution of the application program after failures havebeen properly handled. Below is the code for resumeExecution:

 // Resume computation after a failure has been handled.  defresumeExecution( ){   switch (computationType) {    case GENERAL:runResiliently( );     break    case ITERATIVE: iterateResiliently( );    break;    default:     throw new Exception(″Error inResilientExecutor.X10: unknown value of computationType inresumeExecution( ): ″ + computationType);   }  } }

Note that it is straightforward, within the spirit and scope of thepresent disclosure, to extend resumeExecution to handle other types ofcomputations besides GENERAL and ITERATIVE.

A main aspect of the present disclosure is checkpointing. The resilientexecutor provides the following methods for checkpointing which areinvoked by application programs.

 /* Checkpoint the computation. This is called within transitively from * runResiliently, so exceptions are already being caught and handled. */ public def checkpoint( ): void {   finish for (i in0..(virtualPlaces.totalVirtualPlaces( ) - 1)) {     val p:Place =virtualPlaces.virtualToPhysical(i);     async      at (p)checkpointAtPlace( );   } // this could fail with dead place exception    checkpointAtPlace0( ); // assume that this won't fail    numCheckPoints++;   if (numCheckPoints > 1) {     deleteCheckPoint();   } } private def checkpointAtPlace( ) {   switch (computationType) {   case GENERAL: computation.checkpointAtPlace( ); //application-specific method     break;    case ITERATIVE:iterativeComputation.checkpointAtPlace( ); // application-specificmethod     break;    default:     throw new Exception(″Error inResilientExecutor.X10: unknown value of computationType incheckpointAtPlace( ): ″ + computationType);   } } private defcheckpointAtPlace0( ) {   switch (computationType) {    case GENERAL:computation.checkpointAtPlace0( ); // application-specific method    break;    case ITERATIVE: iterativeComputation.checkpointAtPlace0(); // application-specific method     break;    default:     throw newException(″Error in ResilientExecutor.X10: unknown value ofcomputationType in checkpointAtPlace0( ): ″ + computationType);   } }

According to the present example which uses an X10 implementation, aspecial place, Place 0, is assumed to never fail. Therefore, anembodiment of the present disclosure can safely checkpoint at least someapplication state information at Place 0. This is one reason for havingthe checkpointAtPlace0( ) method. If a system cannot assume that a Place0 exists which never fails, then an application would not use thecheckpointAtPlace0( ) method.

When a new checkpoint c1 is taken, the present example maintains theprevious checkpoint c0 stored in resilient storage. That way, if afailure occurs while c1 is being computed, the system will still have c0to restore a state to the executing application. After c1 has completelycomputed, it is safe to delete c0. The ResilientExecutor, according tothe present example, has the following methods to delete the oldcheckpoint c0 right after c1 has been completely computed:

 /* Delete previous checkpoint. This is only called after a new   *checkpoint has successfully completed.   */  def deleteCheckPoint( ) :void {    finish for (i in 0..(virtualPlaces.totalVirtualPlaces( ) - 1)){      val p:Place = virtualPlaces.virtualToPhysical(i);      async      at (p) deleteAtPlace( );    }  }  private def deleteAtPlace( ) {   switch (computationType) {     case GENERAL:computation.deleteAtPlace( ); // application-specific method      break;    case ITERATIVE: iterativeComputation.deleteAtPlace( ); //application-specific method      break;     default:      throw newException(″Error in ResilientExecutor.X10: unknown value ofcomputationType in deleteAtPlace( ): ″ + computationType);   }  }

The application has the option of defining a deleteAtPlace( )methodwhich deletes the previous checkpoint right away. If the applicationchooses not to do so, the application will still continue to runresiliently and correctly. The only drawback may be that the oldcheckpoint c0 will continue to exist stored in resilient storage(instead of being immediately deleted) until the next checkpoint istaken and overwrites c0.

An Example of Use of the ResilientExecutor Class by Applications

With reference to FIGS. 1 to 5, below will be discussed an example of aninformation processing system 100 that can resiliently execute anapplication using the ResilientExecutor class. For illustration purposesonly, and not for any limitation of the present disclosure, an exampleapplication to be executed by the information processing system 100 is amolecular mechanics simulation implemented as aResilientIterativeComputation.

The application creates an instance of a ResilientExecutor class:

resExec=new ResilientExecutor(this);

The resilient executor is then invoked via:

resExec.iterateResiliently( );

The application implements a number of methods which theResilientExecutor instance executes resiliently using exception handlingdescribed earlier. These methods include:

  // called by ResilientExecutor public def step( ): void { mdStep(timestep);  step++; } public def notFinished( ): Boolean { return (step < numSteps); }

The following code checkpoints the application and is invoked by theResilientExecutor instance:

// checkpoint computation public def checkpoint( ): void {  if ((step %ITERATIONS_PER_BACKUP) == 0) {    // checkpoint atoms and forceField atplace 0    resExec.checkpoint( ); // resExec is the ResilientExecutorinstance   } }

Note that in order to reduce the checkpointing overhead, checkpoints arenot necessarily invoked after every iteration. If after each iteration acheckpoint is invoked, checkpointing overhead might be high. Anadvantage is that recovery time will be short. If checkpointing isinvoked less frequently (i.e. ITERATIONS_PER_BACKUP is an integer largerthan 1), this will reduce checkpointing overhead. The disadvantage isthat recovery time will be longer. There is thus a trade-off betweencheckpointing overhead and recovery time. Frequent checkpoints increasecheckpointing overhead but reduce recovery time after a failure comparedwith less frequent checkpoints.

The application implements the following application-specificcheckpointing methods which are invoked by the ResilientExecutorinstance:

  public def checkpointAtPlace0( ): void {   forceFieldBackup =Runtime.deepCopy(forceField); } public def checkpointAtPlace( ): void { val key = resExec.key(ATOMS_ROOT, false);  backup.put(key, atoms( )); }

The application implements the following application-specific methodwhich is invoked by the ResilientExecutor instance to delete obsoletecheckpoints. It should be noted that this method is optional. If it isnot implemented, the program will continue to operate correctly andresiliently. The advantage to implementing the method is that it reducesspace overhead consumed by checkpoints.

  public def deleteAtPlace( ): void {  val key = resExec.key(ATOMS_ROOT,false);  backup.remove(key); }

In the event of a failure, the following application-specific method isinvoked by the ResilientExecutor instance to restore the state of thecomputation from a previous checkpoint:

 public def restore( ) {   virtualPlaceMap = resExec.getVirtualPlaceMap();   placeGroup = new PlaceGroupUnordered(virtu-  alPlaceMap.getVirtualMap( ));   forceField =Runtime.deepCopy(forceFieldBackup);   atoms =PlaceLocalHandle.make[Rail[MMAtom]](placeGroup, ()=>(backup.get(resExec.key(ATOMS_ROOT, true))));   step =(resExec.numberOfCheckpoints( ) - 1) *   ITERATIONS_PER_BACKUP;  }

Virtual places are also a key element of this application. Theapplication refers to virtual places instead of physical placesthroughout the computation. These virtual places do not change, even ifone or more physical places die while the computation is progressing.

According to the present example, the information processing system 100(see FIG. 1) comprises at least one processor 102 communicativelycoupled with memory 104 and with persistent non-volatile memory 106. Thepersistent memory 106 can store computer instructions 107, data,configuration parameters, and other information that is used by theprocessor 102. All of these stored components stored in persistentmemory 106 can be individually, or in any combination, stored in mainmemory 104 and in the processor cache memory 102. According to thepresent example, a bus communication architecture 108 in the informationprocessing system 100 facilitates communicatively coupling the variouselements of the information processing system 100. A network interfacedevice 124 is communicatively coupled with the processor 102 andprovides a communication interface to communicate with one or moreexternal networks 126.

While FIG. 1 is one possible embodiment of the invention, many otherembodiments are possible. The invention is of particular relevance tosystems with multiple processors. Thus, the earlier descriptions of theinvention are more general and are applicable to a much wider variety ofsystems than the one depicted in FIG. 1.

The instructions 107 may comprise one or more of the following whichhave been discussed in more detail above: a ResilientExecutor class 130,a ResilientComputation 132, a ResilientIterativeComputation 134, aVirtualPlaceMap 136, a ResilientMap 138, a PlaceGroupUnordered 140, aResExec method 144, and other application methods 142.

In persistent memory 106, there is a ResilientMap storage area 118. Acomputer storage device 120 is communicatively coupled with theprocessor 102. The computer storage device 120 can be communicativelycoupled with a computer readable storage medium 122. The computerreadable storage medium 122 can store at least a portion of theinstructions 107.

A user interface 110 is communicatively coupled with the processor 102.The user interface 110 comprises a user output interface 112 and a userinput interface 114. The user output interface 112 includes, accordingto the present example, a display, and audio output interface such asone or more speakers, and various indicators such as visual indicators,audible indicators, and haptic indicators. A user input interface 114includes, according to the present example, a keyboard, a mouse or othercursor navigation module such as a touch screen, touch pad, a pen inputinterface, and a microphone for input of audible signals such as userspeech, data and commands that can be recognized by the processor 102.

FIG. 2 illustrates an example ResilientComputation interface 132 whichincludes several methods. The run method runs the computation andadditionally creates a checkpoint of the state of the applicationcomputation periodically. If there is a failure in one or more placesexecuting computations of the application, the restore method can beinvoked to restore the state of the application computation to the lastcheckpoint stored in the ResilientMap storage 118. Checkpoint datastructures may be saved at place 0. Also, specific checkpoint datastructures at specific places may be checkpointed to the ResilientMapstorage 118. After a new checkpoint of a state of an applicationcomputation is saved to the ResilientMap storage 118, optionally theprevious checkpoint stored in ResilientMap storage 118 can be deletedfrom the resilient storage. This optimizes space usage by deleting staleand unnecessary application state information from the ResilientMapstorage 118.

FIG. 3 illustrates an example ResilientIterativeComputation Interface134 which includes several methods. The step method is used to advancethe state of a computation by one step. The notFinished method indicateswhether the computation should continue executing. It is typicallyinvoked by the resilient framework after each step of an iterativecomputation. A restore method restores the state of the applicationcomputation to the last stored checkpoint after a failure is detected. Amethod deleteAtPlace can be invoked by the resilient framework to deletea previously stored checkpoint from the ResilientMap storage 118. Thismethod optimizes space usage by deleting stale and unnecessaryapplication state information from the ResilientMap storage 118.

Referring to FIGS. 4 and 5, the ResilientExecutor class 130 includesseveral methods which can be invoked by an application. TheResilientComputation creates a new instance for a computation of theapplication. The ResilientIterativeComputation creates a new instancefor an iterative computation of the application.

The runResiliently method invokes an application specific run method toresiliently execute one or more computations of the application. TherunResiliently method can invoke an application specific restore methodthat restores application state information from a previous checkpointstored in the ResilientMap storage 118.

A checkpoint method stores application specific data in ResilientMapstorage 118. A numberOfCheckpoints method provides a total number ofcompleted checkpoints so far. A key method can be invoked to compute akey for an object to be used for checkpoint operations. This allowsapplication programs to use the ResilientMap Interface for checkpointingdata without having to manually calculate keys. A getVirtualPlaceMapmethod returns the virtual place map corresponding to a computation ofthe application. This method allows the application to use virtualplaces.

Various Aspects of a Resilient Framework According to the PresentDisclosure

1) Use of a resilient store for checkpointing, and efficient andeasy-to-use checkpointing techniques.

2) Use of virtual places to mask dead places.

3) An effective way to catch relevant exceptions and handle failuresduring execution, a restore phase after a failure, and anexception-handling method in the resilient framework.

4) Object-oriented framework and API to make the approach easy to use.

The present disclosure has illustrated by example a novel informationprocessing system and a novel method that provide a new computerprogramming framework for programmers to write resilient programs. Lowlevel details such as catching and handling failures are handled byspecial software. This relieves significant programming burdens fromsoftware programmers and particularly from programmers of modernparallel computing applications.

Non-Limiting Examples

As will be appreciated by one of ordinary skill in the art, aspects ofthe present disclosure may be embodied as a system, method, or computerprogram product. Accordingly, aspects of the present disclosure may takethe form of an entirely hardware embodiment, an entirely softwareembodiment (including firmware, resident software, micro-code, etc.) oran embodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit”, “module”, or “system.”

Various embodiments of the present invention may be a system, a method,and/or a computer program product. The computer program product mayinclude a computer readable storage medium (or media) having computerreadable program instructions thereon for causing a processor to carryout aspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Java, Smalltalk, C++ or the like,and conventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present disclosure are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

While the computer readable storage medium is shown in an exampleembodiment to be a single medium, the term “computer readable storagemedium” should be taken to include a single medium or multiple media(e.g., a centralized or distributed database, and/or associated cachesand servers) that store the one or more sets of instructions. The term“computer-readable storage medium” shall also be taken to include anynon-transitory medium that is capable of storing or encoding a set ofinstructions for execution by the machine and that cause the machine toperform any one or more of the methods of the subject disclosure.

The term “computer-readable storage medium” shall accordingly be takento include, but not be limited to: solid-state memories such as a memorycard or other package that houses one or more read-only (non-volatile)memories, random access memories, or other re-writable (volatile)memories, a magneto-optical or optical medium such as a disk or tape, orother tangible media which can be used to store information.Accordingly, the disclosure is considered to include any one or more ofa computer-readable storage medium, as listed herein and includingart-recognized equivalents and successor media, in which the softwareimplementations herein are stored.

Although the present specification may describe components and functionsimplemented in the embodiments with reference to particular standardsand protocols, the disclosure is not limited to such standards andprotocols. Each of the standards represents examples of the state of theart. Such standards are from time-to-time superseded by faster or moreefficient equivalents having essentially the same functions.

The illustrations of examples described herein are intended to provide ageneral understanding of the structure of various embodiments, and theyare not intended to serve as a complete description of all the elementsand features of apparatus and systems that might make use of thestructures described herein. Many other embodiments will be apparent tothose of skill in the art upon reviewing the above description. Otherembodiments may be utilized and derived therefrom, such that structuraland logical substitutions and changes may be made without departing fromthe scope of this disclosure. Figures are also merely representationaland may not be drawn to scale. Certain proportions thereof may beexaggerated, while others may be minimized. Accordingly, thespecification and drawings are to be regarded in an illustrative ratherthan a restrictive sense.

Although specific embodiments have been illustrated and describedherein, it should be appreciated that any arrangement calculated toachieve the same purpose may be substituted for the specific embodimentsshown. The examples herein are intended to cover any and all adaptationsor variations of various embodiments. Combinations of the aboveembodiments, and other embodiments not specifically described herein,are contemplated herein.

The Abstract is provided with the understanding that it is not intendedbe used to interpret or limit the scope or meaning of the claims. Inaddition, in the foregoing Detailed Description, various features aregrouped together in a single example embodiment for the purpose ofstreamlining the disclosure. This method of disclosure is not to beinterpreted as reflecting an intention that the claimed embodimentsrequire more features than are expressly recited in each claim. Rather,as the following claims reflect, inventive subject matter lies in lessthan all features of a single disclosed embodiment. Thus the followingclaims are hereby incorporated into the Detailed Description, with eachclaim standing on its own as a separately claimed subject matter.

Although only one processor 102 is illustrated for informationprocessing system 100, information processing systems with multiple CPUsor processors can be used equally effectively. Various embodiments ofthe present disclosure can further incorporate interfaces that eachincludes separate, fully programmed microprocessors that are used tooff-load processing from the processor 102. An operating system (notshown) included in main memory for the information processing system 100may be a suitable multitasking and/or multiprocessing operating system,such as, but not limited to, any of the Linux, UNIX, Windows, andWindows Server based operating systems. Various embodiments of thepresent disclosure are able to use any other suitable operating system.Various embodiments of the present disclosure utilize architectures,such as an object oriented framework mechanism, that allows instructionsof the components of operating system (not shown) to be executed on anyprocessor located within the information processing system. Variousembodiments of the present disclosure are able to be adapted to workwith any data communications connections including present day analogand/or digital techniques or via a future networking mechanism.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof. The term “another”, as used herein,is defined as at least a second or more. The terms “including” and“having,” as used herein, are defined as comprising (i.e., openlanguage). The term “coupled,” as used herein, is defined as“connected,” although not necessarily directly, and not necessarilymechanically. “Communicatively coupled” refers to coupling of componentssuch that these components are able to communicate with one anotherthrough, for example, wired, wireless or other communications media. Theterms “communicatively coupled” or “communicatively coupling” include,but are not limited to, communicating electronic control signals bywhich one element may direct or control another. The term “configuredto” describes hardware, software or a combination of hardware andsoftware that is adapted to, set up, arranged, built, composed,constructed, designed or that has any combination of thesecharacteristics to carry out a given function. The term “adapted to”describes hardware, software or a combination of hardware and softwarethat is capable of, able to accommodate, to make, or that is suitable tocarry out a given function.

The terms “controller”, “computer”, “processor”, “server”, “client”,“computer system”, “computing system”, “personal computing system”,“processing system”, or “information processing system”, describeexamples of a suitably configured processing system adapted to implementone or more embodiments herein. Any suitably configured processingsystem is similarly able to be used by embodiments herein, for exampleand not for limitation, a personal computer, a laptop personal computer(laptop PC), a tablet computer, a smart phone, a mobile phone, awireless communication device, a personal digital assistant, aworkstation, and the like. A processing system may include one or moreprocessing systems or processors. A processing system can be realized ina centralized fashion in one processing system or in a distributedfashion where different elements are spread across severalinterconnected processing systems.

The term “place” as used herein is intended to broadly describe at leasta part of an executing computation that may be for an application, suchas a process (or in some cases, at least one thread). The term “virtualplace” as used herein is intended to broadly describe a place that isreferenced by executing programs, where the actual physical place onwhich a computation is executing is hidden from the referencing programsthat use the virtual place instead of the actual physical place. Virtualplaces are mapped to physical places. Mappings of virtual places tophysical places can be updated to mask physical place failures.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription herein has been presented for purposes of illustration anddescription, but is not intended to be exhaustive or limited to theexamples in the form disclosed. Many modifications and variations willbe apparent to those of ordinary skill in the art without departing fromthe scope of the examples presented or claimed. The disclosedembodiments were chosen and described in order to explain the principlesof the embodiments and the practical application, and to enable othersof ordinary skill in the art to understand the various embodiments withvarious modifications as are suited to the particular use contemplated.It is intended that the appended claims below cover any and all suchapplications, modifications, and variations within the scope of theembodiments.

What is claimed is:
 1. An information processing system capable ofsupporting resilient execution of applications written in a programminglanguage with exception handling, the information processing systemcomprising: memory; persistent memory for storing data and computerinstructions; a resilient executor, communicatively coupled with thememory and the persistent memory, for executing computations ofapplications while detecting failures in the execution of thecomputations; and at least one processor, communicatively coupled withthe resilient executor, the memory, the persistent memory, and whereinthe at least one processor, responsive to executing computerinstructions, performs operations comprising: providing an interfaceallowing programs to explicitly reference a place to communicate with orexecute at least one computation on the place, wherein each placecomprises an entity executing a computation; providing a virtual placeabstraction layer which defines a mapping between virtual places andphysical places; providing an interface allowing an application tocommunicate with or execute at least one computation on a physical placep1 by referencing a virtual place p2 which is mapped to physical placep1; and in response to a physical place p3 failing, wherein virtualplace p4 maps to physical place p3, updating the mapping so that virtualplace p4 maps to physical place p5 wherein physical place p5 is live. 2.The information processing system of claim 1 further comprising: aresilient store, communicatively coupled with the memory and thepersistent memory, wherein application state information stored in theresilient store is accessible in response to detection of a failure ofan application executing in the information processing system.
 3. Theinformation processing system of claim 2 wherein the at least oneprocessor performs operations further comprising: periodicallycheckpointing an application state in the resilient store.
 4. Theinformation processing system of claim 3 wherein the at least oneprocessor performs operations further comprising: executing, with theresilient executor, computations of the application while detectingfailures in the execution of the computations, wherein the resilientexecutor includes computer code which is part of the application.
 5. Theinformation processing system of claim 4 wherein the at least oneprocessor performs operations further comprising: restoring, based onthe resilient executor detecting a failure in the execution of acomputation of the application by catching with said computer code atleast one exception, application state information for the applicationfrom a checkpoint in the resilient store; and resuming, with theresilient executor, execution of the computation of the application withthe restored application state information.
 6. The informationprocessing system of claim 5, wherein the resilient executor comprises:an interface allowing applications to use the resilient executor; aresilient run method which the application invokes via the interfacewhich executes the application while detecting and catching placefailures as exceptions; and a recovery method which is invoked when theresilient run method catches an exception resulting from a failed placewherein the recovery method recovers from the place failure, restoresthe application to a previous checkpoint in the resilient store, andresumes execution of the application from the restored checkpoint. 7.The information processing system of claim 1, wherein at least one ofphysical place p1, physical place p3, and physical place p5, comprisesat least one of a process and a thread.
 8. The information processingsystem of claim 1, wherein the resilient executor includes a method forresiliently executing an iterative computation.
 9. The informationprocessing system of claim 1, wherein the resilient executor handles aniterative computation by invoking at least one of anapplication-specific method to execute an iteration of a computation ofthe application and an application-specific method to determine if thecomputation has finished.
 10. The information processing system of claim1, wherein the resilient executor handles at least one exception byrecursively catching and handling additional exceptions which occur. 11.A computer readable storage medium, comprising computer instructionswhich, responsive to being executed by a processor of an informationprocessing system, cause the processor to perform operations forsupporting resilient execution of applications written in a programminglanguage with exception handling, the information processing systemcomprising memory for storing data and computer instructions, and aresilient executor for executing computations of the applications whiledetecting failures in the execution of the computations, the operationscomprising: providing an interface allowing programs to explicitlyreference a place to communicate with or execute at least onecomputation on the place, wherein each place comprises an entityexecuting a computation; providing a virtual place abstraction layerwhich defines a mapping between virtual places and physical places;providing an interface allowing an application to communicate with orexecute at least one computation on a physical place p1 by referencing avirtual place p2 which is mapped to physical place p1; and in responseto a physical place p3 failing, wherein virtual place p4 maps tophysical place p3, updating the mapping so that virtual place p4 maps tophysical place p5 wherein physical place p5 is live.
 12. The computerreadable storage medium of claim 11, wherein the information processingsystem further comprises a resilient store, communicatively coupled withthe memory, wherein application state information stored in theresilient store is accessible in response to detection of a failure ofan application executing in the information processing system, andwherein the operations further comprise: in response to detection of afailure of an application executing in the information processingsystem, the resilient store accessing the application state informationstored in the resilient store.
 13. The computer readable storage mediumof claim 12, wherein the operations further comprise: periodicallycheckpointing an application state in the resilient store.
 14. Thecomputer readable storage medium of claim 13, wherein the operationsfurther comprise: executing, with the resilient executor, computationsof the application while detecting failures in the execution of thecomputations, wherein the resilient executor includes computer codewhich is part of the application.
 15. The computer readable storagemedium of claim 14, wherein the operations further comprise: restoring,based on the resilient executor detecting a failure in the execution ofa computation of the application by catching with said computer code atleast one exception, application state information for the applicationfrom a checkpoint in the resilient store; and resuming, with theresilient executor, execution of the computation of the application withthe restored application state information.
 16. The computer readablestorage medium of claim 15, wherein the resilient executor furtherincludes: an interface allowing applications to use the resilientexecutor; a resilient run method which the application invokes via theinterface which executes the application while detecting and catchingplace failures as exceptions; and a recovery method which is invokedwhen the resilient run method catches an exception resulting from afailed place wherein the recovery method recovers from the placefailure, restores the application to a previous checkpoint in theresilient store, and resumes execution of the application from therestored checkpoint, and wherein the operations further comprise:invoking, via the interface, the resilient run method which executes theapplication while detecting and catching place failures as exceptions;and invoking the recovery method based on the resilient run methodcatching an exception resulting from a particular failed place, therecovery method: recovering from the particular failed place failure;restoring the application to a previous checkpoint in the resilientstore; and resuming execution of the application from the restoredcheckpoint.
 17. The computer readable storage medium of claim 11,wherein at least one of physical place p1, physical place p3, andphysical place p5, comprises at least one of a process and a thread. 18.The computer readable storage medium of claim 11, wherein the resilientexecutor further includes a method for resiliently executing aniterative computation, and wherein the operations further comprise:resiliently executing, with the method included in the resilientexecutor, an iterative computation on physical place p1 by referencingvirtual place p2 which is mapped to physical place p1.
 19. The computerreadable storage medium of claim 11, wherein the resilient executorhandles an iterative computation by invoking at least one of anapplication-specific method to execute an iteration of a computation ofthe application and an application-specific method to determine if thecomputation has finished, and wherein the operations further comprise:handling, with the resilient executor, an iterative computation byinvoking at least one of the application-specific method to execute aniteration of a computation of the application and theapplication-specific method to determine if the computation hasfinished.
 20. The computer readable storage medium of claim 11, whereinthe operations further comprise: handling, with the resilient executor,at least one exception by recursively catching and handling additionalexceptions which occur.